import { ref } from 'vue'
import { defineStore } from 'pinia'
import axios from 'ax
ios'
export const useJokerStore = defineStore('joke', () => {
  const joke = ref('我是测试文本')
  const refreshJoke = async () => {
    const res = await axios.get('https://api-vue-base.itheima.net/api/joke')
    console.log(res.data)
    joke.value = '你好'
  }

  return { joke, refreshJoke }
})
